package com.app.shortvideo

import com.app.shortvideo.entry.UserInfo
import com.app.shortvideo.config.SPConst
import com.blankj.utilcode.util.SPUtils
import java.io.Serializable

object Session : Serializable {

    var userInfo: UserInfo? = null


    fun isSessionOpen(): Boolean {
        return userInfo != null
    }
    fun getToken(): String {
        return SPUtils.getInstance().getString(SPConst.CACHE_TOKEN)
    }

    fun clearSession() {
        SPUtils.getInstance().put(SPConst.CACHE_TOKEN,"")
    }

}